package com.wqb.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wqb.server.pojo.Employee;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 万秋泊
 * @since 2022-03-10
 */
public interface EmployeeMapper extends BaseMapper<Employee> {


    /**
     * 分页获取员工（分页）
     *
     * @param page           mybatis分页对象
     * @param employee       员工对象
     * @param beginDateScope 起始日期
     * @return
     */
    IPage<Employee> getEmployeeByPage(
            Page<Employee> page,
            @Param("employee") Employee employee,
            @Param("beginDateScope") LocalDate[] beginDateScope);

    /**
     * 查询全部员工
     *
     * @param id 员工id
     * @return
     */
    List<Employee> getEmployee(Integer id);

    /**
     * 获取所有员工工资账套
     * @param page page
     * @return
     */
    IPage<Employee> getEmployeeWithSalary(Page<Employee> page);
}
